package cn.getech.data.metadata.model.req.roledatapermission;

import cn.getech.data.intelligence.common.utils.PageReq;
import cn.getech.data.intelligence.common.validator.group.AddGroup;
import cn.getech.data.intelligence.common.validator.group.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@ApiModel(description = "元数据表权限保存请求")
@Data
public class CollectionTableRoleDataPermissionSaveReq extends PageReq {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("角色id")
    @NotNull(message = "角色id不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Long roleId;

    @ApiModelProperty("权限列表")
    @NotEmpty(message = "权限列表不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private List<CollectionTableRoleDataPermissionSaveInner> permissioins;
}
